/*******************************************************************************
 * Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 * 
 * This software is the confidential and proprietary information of ETCORE Labs.
 * You shall not disclose such confidential information and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with ETCORE Labs. 
 * 
 * Support can be obtained from support forums at:  http://www.etcore.com/
 * /
 *******************************************************************************/
package etcore.webapp.grouptalk.user.object;

import etcore.webapp.grouptalk.common.config.Config;
import etcore.webapp.grouptalk.util.DateUtil;

/**
 * An instance of Member is a membership link between User and Group
 * 
 * @author ETCORE GroupTalk Developers
 * 
 */
public class Member implements java.io.Serializable {

	private static final long serialVersionUID = -5133914569539594594L;
	public static final String OWNER = "owner";
	public static final String ADMINISTRATOR = "administrator";
	public static final String MEMBER = "member";

	private Integer id;
	private String userName;
	private Integer gid; // group id
	private String mytype=MEMBER; // member type
	private String createTime;
	private Integer mainnum = 0;// count of posted messages
	private Integer totalnum = 0;// count of posted messages and comments
	private Integer app = 0;
	private Integer locked = 0; // controls whether the member is locked
	private Integer energy = 0;
	private String lastTime;

	// Constructors

	/** default constructor */
	public Member() {
		lastTime = DateUtil.getTime(Config.getProperty(Config.HOURS_DIFFERENCE));
		createTime =DateUtil.getTime(Config.getProperty(Config.HOURS_DIFFERENCE));
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Integer getGid() {
		return this.gid;
	}

	public void setGid(Integer gid) {
		this.gid = gid;
	}

	public String getMytype() {
		return this.mytype;
	}

	public void setMytype(String mytype) {
		this.mytype = mytype;
	}

	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public Integer getMainnum() {
		return this.mainnum;
	}

	public void setMainnum(Integer mainnum) {
		this.mainnum = mainnum;
	}

	public Integer getTotalnum() {
		return this.totalnum;
	}

	public void setTotalnum(Integer totalnum) {
		this.totalnum = totalnum;
	}

	public Integer getApp() {
		return this.app;
	}

	public void setApp(Integer app) {
		this.app = app;
	}

	public Integer getLocked() {
		return this.locked;
	}

	public void setLocked(Integer locked) {
		this.locked = locked;
	}

	public Integer getEnergy() {
		return this.energy;
	}

	public void setEnergy(Integer energy) {
		this.energy = energy;
	}

	public String getLastTime() {
		return this.lastTime;
	}

	public void setLastTime(String lastTime) {
		this.lastTime = lastTime;
	}

}